#include<bits/stdc++.h>
#define For(i, a, b) for(register int i = (a); i <= (b); ++i)
#define Rof(i, a, b) for(register int i = (a); i >= (b); ++i)
#define For_Edge(i, x) for(auto i : edge[x])
#define For_Mul(i, a, b) for(register int i = (a); i <= (b); i += (a))
#define pii pair <int, int>
#define x1 _x
#define y1 _y
#define fi first
#define se second
#define eb emplace_back
#define mp make_pair
#define Size(a) ((int)a.size())
#define All(a) a.begin(), a.end()
using namespace std;
inline int read() {
    int x = 0;
    char c = getchar();
    bool f = 0;
    while(!isdigit(c)) f |= (c == '-'), c = getchar();
    while(isdigit(c)) x = (x * 10) + (c ^ 48), c = getchar();
    return f ? -x : x;
}
const int mod = 998244353;
inline void Add(int &x, int y) { return x = (x + y >= mod ? x + y - mod : x + y), void(); }
int n, m;
namespace Sub1 {
    const int maxn = 205;
    struct Matrix {
        int n, m;
        int num[maxn][maxn];
        inline void Clear(int n0, int m0) {
            n = n0, m = m0;
            For(i, 1, n)
                For(j, 1, n) num[i][j] = 0;
        }
        inline void Init() { For(i, 1, n) num[i][i] = 1; }
        inline int & operator()(int x, int y) { return num[x][y]; }
    }Base, f;
    inline Matrix operator *(Matrix A, Matrix B) {
        Matrix C; C.Clear(A.n, B.m);
        For(i, 1, A.n)
            For(j, 1, B.m)
                For(k, 1, A.m) Add(C(i, j), 1ll * A(i, k) * B(k, j) % mod);
        return C;
    }
    inline Matrix operator ^(Matrix A, int B) {
        Matrix res; res.Clear(A.n, A.m), res.Init();
        while(B) {
            if(B & 1) res = res * A;
            A = A * A, B >>= 1;
        }
        return res;
    }
    inline void Ready() {
        Base.Clear(n, n), f.Clear(1, n);
        For(i, 1, n) Base(i, i) = max(1, i - 1);
        For(i, 2, n) Base(i, i - 1) = 1;
        For(i, 1, n)
            For(j, i + 1, n) Base(i, j) = 1;
        f(1, 1) = 1;
    }
    inline void Work() {
        Ready();
        Base = Base ^ m, f = f * Base;
        printf("%d\n", f(1, 1));
    }
}
int main() {
    freopen("drama.in", "r", stdin);
    freopen("drama.out", "w", stdout);
    n = read(), m = read();
    if(n <= 200) Sub1::Work();
    return 0;
}

